<%@ page language="java" import="java.util.*,com.king.cms.common.*" pageEncoding="UTF-8"%>
<%@ include file="/hotel/include/css.jsp"%>
<%-- /*包含css样式表*/ --%>
<%  
	String pageFunc = "终端设置";		//功能描述
%>
<% 
	int pow=(PowerParameter.save | PowerParameter.cls | PowerParameter.list);
	Map map = (Map)request.getAttribute("client");
%>


<html>
	<head>
		<title><%=pageFunc%>
		</title>
		<script language="javascript">
	function doEnable()
	{
		form1.bmMc.disabled=false;
		form1.bmBzrs.disabled=false;
	}
	function ki_save(){
      var flag = true;
      
	  if(clskg(document.getElementById("clientName").value) == '') {
	 	   alert('终端名称不能为空');
	 	   flag = false;
	 	   return;
	  }
	  if(clskg(document.getElementById("clientIp").value) == '') {
	 	   alert('终端IP不能为空');
	 	   flag = false;
	 	   return;
	  }
	  if(clskg(document.getElementById("clientMac").value) == '') {
	 	   alert('终端Mac不能为空');
	 	   flag = false;
	 	   return;
	  }
	  if(clskg(document.getElementById("clientAddress").value) == '') {
	 	   alert('终端地址不能为空');
	 	   flag = false;
	 	   return;
	  } 
	 if(flag)
	    form1.submit();
	}
	function ki_cls(){
		document.getElementById("clientName").value='';
		document.getElementById("clientIp").value='';
		document.getElementById("clientMac").value='';
		document.getElementById("clientAddress").value='';
		
	}
	function ki_list(){
		window.open('<%=basePath%>client.do?action=list','_self');
	}
	////////除去空格/////////
	function clskg(va){
	  var th=/\s/g;
	 va=va.replace(th,'');
	 return va;
	}
</script>
	</head>
	<body background="<%=imgpath%>top3.gif" leftmargin="0" topmargin="0">
		 <br> 
		<form name="form1" method="post"
			action="<%=basePath%>client.do?action=saveclient">
			<table border="0" cellpadding="0" cellspacing="0" align="center" width="98%"
				height="2">
				<tr>
					<td width="9" height="1"></td>
					<td height="1" background="<%=path%>/img/images_06.gif">
						<p align="center">
							<b><%=pageFunc%>
							</b>
					</td>
					<td width="9" height="1"></td>
				</tr>
			</table>
			<table height="48" border="0" cellpadding="2" cellspacing="1"
				class="bg_table" style="width:90%" bordercolor="#111111">
				<tr class="top_td">
					<td colspan="4"  >
						修改终端设备
					</td>
				</tr>
				<tr class="td2">
					<td width="20%">
						终端设备名称
					</td>
					<td width="80%" colspan=3>
					    <input type="hidden" name="clientId" value="<%=map.get("ID") %>">
						<input type="text" name="clientName" value="<%=StringUtil.NULL2Blank(map.get("CLIENT_NAME")+"") %>" style="width:95%" class="area100"  check="c_n_50">
					</td>
					 
				</tr>
				<tr class="td2">
				<td width="20%">
						IP地址
					</td>
					<td width="30%">
						<input type="text" name="clientIp" style="width:90%" class="area100" value="<%=StringUtil.NULL2Blank(map.get("CLIENT_IP")+"") %>" check="c_n_50">
					</td>
					<td width="20%">
						网卡号
					</td>
					<td width="30%">
						<input type="text" name="clientMac" style="width:90%" class="area100" value="<%=StringUtil.NULL2Blank(map.get("CLIENT_MAC")+"") %> check="c_n_50">
					</td>
					
				</tr>
				<tr class="td2">
				<td width="20%">
						地址
					</td>
					<td width="30%">
						<input type="text" name="clientAddress" style="width:90%" value="<%=StringUtil.NULL2Blank(map.get("CLIENT_ADDRESS")+"") %>" class="area100"  check="c_n_50">
					</td>
					<td width="20%">
						终端组
					</td>
					<td width="30%">
						<input type="text" name="group" style="width:90%" class="area100" value="<%=StringUtil.NULL2Blank(map.get("CLIENT_GROUP")+"") %>" check="c_n_50">
					</td>
					
				</tr>
				<tr class="top_td">
					<td colspan="4"> 
					</td>
				</tr>
			</table>
</form>
		</body>
</html>
<%@ include file="/hotel/pow.jsp"%>
